<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="animate.js"></script>
    <style>
        .slider {
            position: absolute;
            bottom: 100px;
            right: 0;
            width: 40px;
            height: 40px;
            line-height: 40px;
            background-color: purple;
            color: #fff;
            text-align: center;
            overflow: hidden;
            cursor: pointer;
        }

        .over {
            overflow: visible;
        }

        .con {
            position: absolute;
            bottom: 0px;
            right: -100px;
            width: 100px;
            height: 40px;
            background-color: purple;
            z-index: -1;
        }

        span {
            position: absolute;
            top: 0;
            z-index: 999;
            color: #fff;
        }
    </style>
</head>

<body>
    <div class="slider">
        <span>⬅</span>
        <div class="con">
            问题反馈
        </div>
    </div>

    <script>
        var slider = document.querySelector('.slider');
        var con = document.querySelector('.con');
        var span = document.querySelector('span');
        slider.addEventListener('mouseover', function () {
            slider.className = 'slider over';
            animate(con, -100, function () {
                slider.children[0].innerHTML = '➡';

            });
        });
        slider.addEventListener('mouseleave', function () {
            slider.className = 'slider';
            animate(con, 40, function () {
                slider.children[0].innerHTML = '⬅';
            });
        });
    </script>
</body>

</html>